package com.shuaigef.springbootinit.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shuaigef.springbootinit.model.dto.exercise.ExerciseAddRequest;
import com.shuaigef.springbootinit.model.entity.Exercise;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 * @description 针对表【exercise】的数据库操作Service
 * @createDate 2025-01-22 09:04:52
 */
public interface ExerciseService extends IService<Exercise> {

    String getExercise(ExerciseAddRequest exerciseAddRequest);


    String getRepeatExercise(ExerciseAddRequest exerciseAddRequest, String question, String answerKey);

    /**
     * 根据id查看题目
     *
     * @param id 题目id
     * @return 题目详情
     */
    Exercise getExerciseById(String id);

    /**
     * 获取推荐题目
     * 基于用户的答题历史和正确率推荐适合的题目
     *
     * @param userId 用户ID
     * @return 推荐的题目列表
     */
    List<Exercise> getRecommendExercises(Integer userId);

    /**
     * 分析学生的薄弱环节
     *
     * @param userId 用户ID
     * @return 学生薄弱环节分析结果
     */
    Map<String, Object> analyzeWeakness(Integer userId);

    Map<String, Object> analyzeProgress( String id);
}
